package com.zx.callback.service.impl;

import com.zx.callback.common.ex.DaoException;
import com.zx.callback.dao.OrderInfoMapper;
import com.zx.callback.po.OrderInfo;
import com.zx.callback.service.OrderOperService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ：yanst
 * @since: 2017/12/7
 * @history：(date editor desc)
 */
@Service
public class OrderOperServiceImpl implements OrderOperService {

    @Resource
    private OrderInfoMapper orderInfoMapper;

    @Override
    public void update(OrderInfo orderInfo) {
       int result = orderInfoMapper.updateByPrimaryKeySelective(orderInfo);
        if (result != 1){
            throw new DaoException("修改订单sql影响行数不正确！");
        }
    }
}
